package com.wanmait.wisdom.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wanmait.wisdom.entity.AdminRoles;
import com.wanmait.wisdom.manage.service.ManageAdminRoleService;
import com.wanmait.wisdom.mapper.AdminRolesMapper;
import com.wanmait.wisdom.util.AjaxResult;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class ManageAdminRoleServiceImpl extends ServiceImpl<AdminRolesMapper, AdminRoles> implements ManageAdminRoleService
{
    @Resource
    private AdminRolesMapper adminRolesMapper;

    @Override
    public AjaxResult findRoles() {
        List<AdminRoles> adminRoles = adminRolesMapper.selectList(null);
        return AjaxResult.success("查询成功").put("adminroles",adminRoles);
    }
}
